﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;
using UnityEditor;

namespace Super
{
	public class AssetMenuExtension : EditorWindow
	{
		
		public static bool CheckIfSelectObject()
		{
			GameObject gameObject = Selection.activeGameObject;
			return gameObject != null;
		}

		[MenuItem("Assets/Create/Super/TemplateManager", true)]
		public static bool CheckIfSelectNoObject()
		{
			GameObject gameObject = Selection.activeGameObject;
			return gameObject == null;
		}

		[MenuItem("Assets/Create/Super/TemplateManager", false, 10)]
		public static void CreateTemplateSingleManager()
		{
			ProjectWindowUtil.CreateScriptAssetFromTemplateFile(FWConfig.templateSingleManager, "TemplateManager.cs");
			LogUtil.Log(LogType.Normal, LogCategory.Create, "TemplateManager文件创建成功");
		}
	}
}
